﻿# Load Functions
$ScriptPath = Split-Path $MyInvocation.MyCommand.Path
Try {
    Get-ChildItem "$ScriptPath\Scripts\*.ps1" | Select-Object -Expand FullName | ForEach {
        $function = Split-Path $_ -Leaf
        $functions += $function.Split(".")[0]
        . $_
    }
} Catch {
    Write-Warning ("{0}: {1}" -f $function, $_.Exception.Message)
    Continue
}

Write-Host "`n"
Write-Host "`t`tPoshTSM 0.0.1"
Write-Host "`n"
Write-Host -nonewline "Connect to TSM Server:`t`t`t"
Write-Host -fore Yellow "Connect-TSMServer"
Write-Host -nonewline "Disconnect from TSM Server:`t`t"
Write-Host -fore Yellow "Disconnect-TSMServer"
Write-Host -nonewline "List all available commands:`t`t"
Write-Host -fore Yellow "Get-Command -Module PoshTSM"
Write-Host "`n"